package one.SnackGame;

import java.awt.*;
import java.awt.image.BufferedImage;

public class GameUtility {
//查看当前工作目录
//    static {
//        System.out.println("当前工作目录: " + System.getProperty("user.dir"));
//    }

    //蛇头 ai帮助放缩
    public static Image upImage = Toolkit.getDefaultToolkit().getImage("HeadBody/d8be05b7180f9fd59f63ec06cc7c483a_compress.jpg");
    //蛇身
    public static Image bodyImage = Toolkit.getDefaultToolkit().getImage("HeadBody/f506cb9a75e2542bbcd4901ec826fda6_compress.jpg");
    //食物
    public static Image foodImage = Toolkit.getDefaultToolkit().getImage("HeadBody/85ad23c79c909e5cf34b602785f1990b_compress.jpg");
    //绘制文字
    public static void drawWorld(Graphics g, String str, Color color, int size, int x, int y){
        g.setColor(color);
        g.setFont(new Font("宋体", Font.BOLD, size));
        g.drawString(str, x, y);
    }
}
